<extend name="Base/common"/>
<block name="body">
	<div class="container">
		<div class="nav">
		    <img src="__IMG__/img_1.png" alt="" id="show">			
			<h3>交易历史</h3>
		</div>
		<div class="transactiontop">
			总盈亏:<span style="color: #dd514c;">{$total_money}元</span>
		</div>
		<div class="transctionright clearfix">
			<div class="transctionto">总单数</div>
			<div class="transctionto">总张数</div>
		</div>
		<div class="transctionright clearfix">
			<div class="transctionto">{$total_number_one}</div>
			<div class="transctionto">{$total_number}</div>
		</div>
		<ul class="transctionlist clearfix">
			<volist name="list" id="vo">
			 	<li class="clearfix">
			 	<span>{$vo.create_time}</span>
			 	<span>{$vo.name}</span>
			 	<span>
			 		<span style="text-align: center">{$vo.number}张</span>
			 		<span style="text-align: center"  class="gen"><if condition="$vo['direction'] eq 1">买涨<else />买跌</if></span>
			 	</span>
			 	<span>{$vo.profit}</span>
			 	<span class="order-span5"><a class="order-a" data-click=0 href="javscript:void(0)">详情</a></span>
			 	<div class="order-maos">
					<table class="order-table">
						<tr>
							<td>状态</td>
							<td>买入价</td>
							<td>卖出价</td>
							<td>订单编号</td>
						</tr>
						<tr>
							<td>已平仓</td>
							<td>{$vo.open_price}</td>
							<td>{$vo.close_price}</td>
							<td>{$vo.transaction_id}</td>
						</tr>
						
					</table>
				</div>
			 	</li>
			  
			</volist>
		</ul>
		<!--翻页  开始-->
		<div class="flip-pag">
		{$page}
		<!--翻页 结束-->
	</div>
<script type="text/javascript">
//点击展开详情
$('.order-span5').find('.order-a').each(function(){
	$(this).click(function(){
		var clik=$(this).attr('data-click');
		if(clik==0){

			$(this).parent().parent().find('.order-maos').css('display','block')
			$(this).css('background','#4c535e');
			$(this).html('关闭');
			$(this).attr('data-click','1');
		}else{
			$(this).parent().parent().find('.order-maos').css('display','none')
			$(this).css('background','#de362a');
			$(this).html('详情');
			$(this).attr('data-click','0');
		}
			
	})
})

//翻页  开始
$('.flip-import').click(function(){
    $(this).css('display','none');
    $('.flip-input').css('display','inline-block');
    $('.flip-input').focus();
})
$('.flip-go').click(function(){
    var page = $('.flip-input').val();
    window.location.href="{$url}"+"/p/"+page;
    $('.flip-input').css('display','none');
    $('.flip-import').css('display','inline-block');
   
})
//翻页  结束
</script>

</block>